package com.mygenostics.bo;

import java.io.File;

public class SampleFile {
	private String name;
    private String mime;
    private long length;
    private File file;
    
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
        int extDot = name.lastIndexOf('.');
        if(extDot > 0){
            String extension = name.substring(extDot +1);
            if("txt".equals(extension)){
                mime="text/plain";
            }  else {
                mime = "unknown/unknown";
            }
        }
    }
    
    public long getLength() {
        return length;
    }
    
    public void setLength(long length) {
        this.length = length;
    }
    
    public String getMime(){
        return mime;
    }

	public File getFile() {
		return file;
	}

	public void setFile(File file) {
		this.file = file;
	}
}
